SftTree/NET 2.0

Expanding and Collapsing Items

Softel vdm, Inc.

SftTree/NET supports expanding and collapsing tree items with minimal application intervention. The application can expand and collapse items without having to add or remove items. The tree control takes care of hiding and making items visible as needed. The expand/collapse buttons are automatically displayed as needed for parent items with dependent items.

The AutoRespond property allows the tree control to expand and collapse items automatically or under program control. Under program control, an application can respond to ItemClick and ItemDoubleClick events and expand or collapse items using the ItemClass.Expand and ItemClass.Collapse methods.

An application can also fully control expanding and collapsing tree items. Rather than adding all items, including dependent items (child items), an application can add all parent items and mark them as expandable without actually adding the dependent items (see the ItemClass.ExpandCollapseButton property). Then, once the application receives an ItemClick event, signaling that the user wants to expand a parent item, the application can add the dependent items.

When items are expanded or collapsed, the ItemExpanded or ItemCollapsed events occur.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com